<%@ page session="true"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page isELIgnored="false" %>

<%@page import="java.util.Date;"%>

<html>
    <head><title>Hello :: Spring Application</title></head>
    <body>
        <h1>Hello2 - Spring Application</h1>
        
        id <c:out value="${book.id}"/><br>
		rank <c:out value="${book.rank}"/><br>
        title <c:out value="${book.title}"/><br>
		tags <c:out value="${book.tags}"/><br>
        description <c:out value="${book.description}"/><br>
		<c:choose>
			<c:when test="${book.author!=null}">
				 <a href='<c:out value='/books/authorDetails.htm?authorId=${book.author.id}'/>'>author</a> name <c:out value="${book.author.name}"/><br>
        		<a href="<c:out value='/books/authorDetails.htm?authorId=${book.author.id}'/>">author</a> surname <c:out value="${book.author.surname}"/><br>
			</c:when>
			<c:otherwise>
				unknown author<br>
			</c:otherwise>
		</c:choose>
	
       
        <div><c:if test="${err != null}">
                <c:out value="${err}" />
        </c:if></div>
        
    </body>
</html>